import React from 'react';
import { connect } from 'dva';
import LoginPage from '../../components/User/Login';

const LoginRoute = ({ dispatch }) => {
  return (
    <LoginPage login={(tel, password)=>{
      dispatch({
        type: 'login/login',
        payload: {tel, password},
      });
    }}

    checkAuth={()=>{
      dispatch({
        type: 'login/checkAuth'
      })
    }}
    />
  );
};


export default connect()(LoginRoute);
